package com.excesys.exsecs.energy.util;

import java.math.BigDecimal;

/**
 * @author zhangtailong
 * @title: PowerConvert
 * @description: 能耗折算标准煤
 * @date 2024-04-18
 */
public class PowerConvert {

	/**
	 * * @description: 度电折算标准吨煤 *
	 * @param {kwh}
	 * @return ${return_type} * @throws * @author zhangtailong * @date 2024-04-18
	 */
	public static Double electricToCoal(Double kwh) {
		Double d = kwh * 1.229 / 10000;
		return new BigDecimal(d).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
	}

	/**
	 * * @description: 天然气（立方米）折算标准吨煤 *
	 * @param {stere}
	 * @return ${return_type} * @throws * @author zhangtailong * @date 2024-04-18
	 */
	public static Double gasToCoal(Double stere) {
		Double d = stere * 12.143 / 10000;
		return new BigDecimal(d).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
	}

	/**
	 * * @description:一吨新鲜水折算标准煤 *
	 * @param {ton}
	 * @return ${return_type} * @throws * @author zhangtailong * @date 2024-04-18
	 */
	public static double waterToCoal(Double ton) {
		Double d = ton * 0.2429 / 1000;
		return new BigDecimal(d).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
	}

}
